//倒计时
var time = {
		etime:0,
		h:0,
		m:0,
		s:0,
		hstr:'',
		mstr:'',
		sstr:'',
		timestr:''
};
function timeDown(fun){
	time.h=Math.floor(time.etime/3600); //时
	time.m=Math.floor(time.etime/60)%60;//分
	time.s=Math.floor(time.etime%60);//秒
	time.h<0?time.h=0:time.h-time.h;
	time.m<0?time.m=0:time.m=time.m;
	time.s<0?time.s=0:time.s=time.s;
	time.h.toString().length < 2 ? time.hstr = "0" + time.h.toString() : time.hstr = time.h; //1显示01
	time.m.toString().length < 2 ? time.mstr = "0" + time.m.toString() : time.mstr = time.m; //1显示01
	time.s.toString().length < 2 ? time.sstr = "0" + time.s.toString() : time.sstr = time.s; //1显示01
	time.timestr = time.hstr + ":" + time.mstr + ":" + time.sstr;
	time.etime = time.etime - 1;
	fun(time.timestr);
}

time.etime = 秒数;//初始化定时器时间参数
setInterval("timeDown(回调函数)",1000);